<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/spanner/v1/spanner.proto

namespace Google\Cloud\Spanner\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * The response for [ListSessions][google.spanner.v1.Spanner.ListSessions].
 *
 * Generated from protobuf message <code>google.spanner.v1.ListSessionsResponse</code>
 */
class ListSessionsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of requested sessions.
     *
     * Generated from protobuf field <code>repeated .google.spanner.v1.Session sessions = 1;</code>
     */
    private $sessions;
    /**
     * `next_page_token` can be sent in a subsequent
     * [ListSessions][google.spanner.v1.Spanner.ListSessions] call to fetch more of the matching
     * sessions.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    private $next_page_token = '';

    public function __construct() {
        \GPBMetadata\Google\Spanner\V1\Spanner::initOnce();
        parent::__construct();
    }

    /**
     * The list of requested sessions.
     *
     * Generated from protobuf field <code>repeated .google.spanner.v1.Session sessions = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSessions()
    {
        return $this->sessions;
    }

    /**
     * The list of requested sessions.
     *
     * Generated from protobuf field <code>repeated .google.spanner.v1.Session sessions = 1;</code>
     * @param \Google\Cloud\Spanner\V1\Session[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSessions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Spanner\V1\Session::class);
        $this->sessions = $arr;

        return $this;
    }

    /**
     * `next_page_token` can be sent in a subsequent
     * [ListSessions][google.spanner.v1.Spanner.ListSessions] call to fetch more of the matching
     * sessions.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * `next_page_token` can be sent in a subsequent
     * [ListSessions][google.spanner.v1.Spanner.ListSessions] call to fetch more of the matching
     * sessions.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_page_token = $var;

        return $this;
    }

}

